package tools;

import java.math.BigInteger;
import java.security.MessageDigest;

public class Encription {
    public static String md5(String str) throws Exception {
        MessageDigest md = MessageDigest.getInstance("MD5");
        md.update(str.getBytes());
        byte[] digest = md.digest();
        String md5String = new BigInteger(1, digest).toString(16);
        return md5String;
    }
}